package org.example.order.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

import java.util.Date;

/**
 * 管理员实体
 */
@Data
@TableName("b_admin")
public class Admin {

    @Schema(description = "管理员ID")
    @TableId(type = IdType.AUTO)
    private Long id;

    @Schema(description = "用户名")
    @TableField("adminName")
    private String adminName;

    @Schema(description = "密码（加密存储）")
    @TableField("password")
    private String password;

    @Schema(description = "状态：0-禁用，1-启用")
    @TableField("status")
    private Integer status;

    @Schema(description = "最后登录时间")
    @TableField("last_login_time")
    private Date lastLoginTime;

    @Schema(description = "最后登录IP")
    @TableField("last_login_ip")
    private String lastLoginIp;

    @Schema(description = "创建时间")
    @TableField("create_time")
    private Date createTime;

    @Schema(description = "更新时间")
    @TableField("update_time")
    private Date updateTime;

    @Schema(description = "令牌")
    @TableField("token")
    private String token;
    @TableLogic(value = "0", delval = "1")
    @Schema(description = "是否删除(0:未删除,1:已删除)", example = "0")
    private int isDelete;
    @Schema(description = "手机号")
    @TableField("phone")
    private String phone;
}
